<?php
global $gBitSystem;

$registerHash = array(
	'package_name' => 'moderate',
	'package_path' => dirname( __FILE__ ).'/',
);
$gBitSystem->registerPackage( $registerHash );

if( $gBitSystem->isPackageActive( 'moderate' ) && $gBitUser->hasPermission('p_moderate_view')) {
	$menuHash = array(
		'package_name'  => MODERATE_PKG_NAME,
		'index_url'     => MODERATE_PKG_URL.'index.php',
		'menu_template' => 'bitpackage:moderate/menu_moderate.tpl',
	);
	$gBitSystem->registerAppMenu( $menuHash );
}

if( $gBitSystem->isPackageActive( 'moderate' ) ) {

	require_once( MODERATE_PKG_PATH.'Moderate.php' );

	$gLibertySystem->registerService( 'bitweaver_content_moderation', MODERATE_PKG_NAME, array(
		'content_load_sql_function'		 => 'moderate_content_load_sql',
		'content_list_sql_function'		 => 'moderate_content_list_sql',
		'content_expunge_function'		 => 'moderate_content_expunge',
		'content_body_tpl'				 => 'bitpackage:moderate/moderate_inline_service.tpl',
		'content_list_tpl'          	 => 'bitpackage:moderate/moderate_list_service.tpl',
		'content_rating_updated_function'=> 'moderate_content_rating_updated',
	) );
}
?>
